From: Hauke Mehrtens Date: Fri, 30 Jul 2010 21:19:49 +0000 (+0000) Subject: mostly revert commit r22396 X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=d34a71c4a44da263d5e98801f3aa62d6fc9b425f;p=project%2Ffirmware-utils.git mostly revert commit r22396 CFE does not boot images generated with these checksums because of wrong checksum. After flashing then with tftp to my Asus wl500-GPv1 the following messages are show: Null Rescue Flag. Boot program checksum is invalid Hello!! Enter Rescue Mode: (Check error) SVN-Revision: 22418 --- diff --git a/src/trx.c b/src/trx.c index 426a6b5..8e95d98 100644 --- a/src/trx.c +++ b/src/trx.c @@ -276,7 +276,7 @@ int main(int argc, char **argv) (fsmark)?fsmark:cur_len - offsetof(struct trx_header, flag_version)); p->crc32 = STORE32_LE(p->crc32); - p->len = (fsmark)?fsmark:cur_len - offsetof(struct trx_header, flag_version); + p->len = STORE32_LE((fsmark) ? fsmark : cur_len); p->len = STORE32_LE(p->len); /* restore TRXv2 bin-header */